/*
 * @Author: 凌宇king
 * @Date: 2022-09-06 10:10:57
 * @LastEditTime: 2022-09-11 13:54:27
 */
const mongoose = require('mongoose')
/* 用户信息约束field字段 */
const userInfoSchema = new mongoose.Schema({
    openid: {
        type: String, unique: true
    },
    nickName: String,
    avatarUrl: String,
    gender: Number,
    phone: String,
    canReceive: { type: Boolean, default: false },
    personInfo: { type: Object, default: null }
})
const user = mongoose.model('UserInfo', userInfoSchema, 'userInfo')
module.exports = user 